package com.lyl.docker.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.UUID;

@Slf4j
@RestController
public class HelloController {

    @Value("${server.port:8080}")
    private Integer port;

    @GetMapping("/hello")
    public String hello(){
        String str = "port = " + port + "  : " + UUID.randomUUID();
        log.info("hello: {}",str);
        return str;
    }

    @GetMapping("/hello2")
    public String hello2(){
        String str = "port = " + port + "  : " + UUID.randomUUID();
        log.info("hello2: {}",str);
        return str;
    }

}
